<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>色卡查看</title>
        <script language="javascript" type="text/javascript" src="{res file=js/jquery-1.2.6.js}"></script>
        <script language="javascript" type="text/javascript" src="{lib file=jquery.plugins/jquery.validate.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=js/common.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=DatePicker/WdatePicker.js}"></script>
        <script language="javascript" type="text/javascript" src="{lib file=ajaxfileupload.js}"></script>
        <script language="javascript" type="text/javascript" src="{res file=js/jquery.funkyUI.js}"></script>
        <script language="JavaScript" type="text/javascript" src="{res file=js/lan.js}"></script>
        <link href="template/style/css/style.css" type="text/css" rel="stylesheet" />
        <style>
            label.error {color:red;}
        </style>
        <script type="text/javascript">
$(function(){
     $('#color_form').validate({
    	onkeyup : false,
 		onfocusout : false,
		rules : {
			fabric_shop_id: {
				required: true
			},
			item: {
				required: true,
				digits:true
			},
		},
		messages : {
			fabric_shop_id: {
				required: '请选择布行/档口'
			},
			item: {
				required: '请输入品名/货号',
				digits:'请输入整数'
			},
		}
	});
});
</script>
        <script language="JavaScript">
	function check_fi(){
		//alert($("#fabric_shop_id option:selected").val());
		//alert($("#item").val());
		var fabric_shop_id = $("#fabric_shop_id option:selected").val();
		var item = $("#item").val();
		$.getJSON( '{$site_url}/index.php?app=colorcard&act=check_fi&fsi='+fabric_shop_id+'&item='+item+'&cc_id='+"{$cc_id}",function(json){
			if(json.done){
				if(json.retval!=0){
					alert("该布行/档口的品名/货号已存在！请重新输入！");
					$("#item").val('');
				}
			}else{
                alert(json.msg);
            }
        });
	}
	
	
	function add_file(obj) {
	var parent = obj.parentNode;
	var span = document.createElement('span');
	span.innerHTML = '<input type="file" name="files[]" class="input-2" hidefocus="true" /><a href="" onclick="remove_file(this);return false;" class="pic_del">移除</a><br /><br />';
	parent.insertBefore(span, obj);
}

function remove_file(obj) {
	var parent = obj.parentNode.parentNode;
	parent.removeChild(obj.parentNode);
}
	</script>
    </head>
    <body>
        <div class="sub-body">
           <h3 class="title-1 tab-frame">色卡信息</h3>
<div class="tab-frame">
    <div class="tab-title-1"><span>色卡信息</span></div>
    <form id="color_form" method="post" enctype="multipart/form-data">
        <table width="100%" cellspacing="0" cellpadding="0" align="left" class="tab-display">
            <tbody>
                <tr>
                    <th width="150" align="center">照片</th>
                    <td align="left">
           <!--{foreach from=$colorcard_files item=file_size}-->
		<a target="_blank" href="{$file_size.file_path}"><img src="{$file_size.file_path}" width="242" height="307" alt="图片" style="border:none;" /></a><!--{if !$smarty.foreach.last}--><!--{/if}-->
		<!--{/foreach}-->
</td>
                </tr>
                <input type="hidden" name="app" value="colorcard" />
                <input type="hidden" name="act" value="edit" />

            </tbody></table>
    </form>
</div>

           
        </div>
        <div id="remsg"></div>
<script language="JavaScript" type="text/javascript" src="{res file=js/tab_color.js}"></script>
    </body>
</html>